﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace TestMatrix.Model
{
    public class tblGlobalDRE : INotifyPropertyChanged, INotifyPropertyChanging
    {
        public tblGlobalDRE()
        {

        }

        public tblGlobalDRE(
            int id
            , string Financialyear
            , string Project
            , int SITBugs
            , int ProductionUATBUGS
            , int OtherBugs
            , string DRE
            

            )
        {
            this.ID = id;
            this.Financialyear = Financialyear;
            this.Project = Project;
            this.SITBugs = SITBugs;
            this.ProductionUATBUGS = ProductionUATBUGS;
            this.OtherBugs = OtherBugs;
            this.DRE = DRE;
            
        }

        private int _ID;

        public int ID
        {
            get { return _ID; }
            set
            {
                if (_ID != value)
                {
                    NotifyPropertyChanging("ID");
                    _ID = value;
                    NotifyPropertyChanged("ID");
                }
            }

        }


        private string _Financialyear;

        public string Financialyear
        {
            get { return _Financialyear; }
            set
            {
                if (_Financialyear != value)
                {
                    NotifyPropertyChanging("Financialyear");
                    _Financialyear = value;
                    NotifyPropertyChanged("Financialyear");
                }
            }
        }

        private string _Project;

        public string Project
        {
            get { return _Project; }
            set
            {
                if (_Project != value)
                {
                    NotifyPropertyChanging("Project");
                    _Project = value;
                    NotifyPropertyChanged("Project");
                }
            }
        }


        private int _SITBugs;

        public int SITBugs
        {
            get { return _SITBugs; }
            set
            {
                if (_SITBugs != value)
                {
                    NotifyPropertyChanging("SITBugs");
                    _SITBugs = value;
                    NotifyPropertyChanged("SITBugs");
                }
            }

        }

        private int _ProductionUATBUGS;

        public int ProductionUATBUGS
        {
            get { return _ProductionUATBUGS; }
            set
            {
                if (_ProductionUATBUGS != value)
                {
                    NotifyPropertyChanging("ProductionUATBUGS");
                    _ProductionUATBUGS = value;
                    NotifyPropertyChanged("ProductionUATBUGS");
                }
            }

        }

        private int _OtherBugs;

        public int OtherBugs
        {
            get { return _OtherBugs; }
            set
            {
                if (_OtherBugs != value)
                {
                    NotifyPropertyChanging("OtherBugs");
                    _OtherBugs = value;
                    NotifyPropertyChanged("OtherBugs");
                }
            }

        }

        private string _DRE;

        public string DRE
        {
            get { return _DRE; }
            set
            {
                if (_DRE != value)
                {
                    NotifyPropertyChanging("DRE");
                    _DRE = value;
                    NotifyPropertyChanged("DRE");
                }
            }

        }

        public event PropertyChangedEventHandler PropertyChanged;

        // Used to notify that a property changed
        private void NotifyPropertyChanged(string propertyName)
        {
            if (PropertyChanged != null)
            {
                PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
            }
        }

        public event PropertyChangingEventHandler PropertyChanging;

        // Used to notify that a property is about to change
        private void NotifyPropertyChanging(string propertyName)
        {
            if (PropertyChanging != null)
            {
                PropertyChanging(this, new PropertyChangingEventArgs(propertyName));
            }

        }
    }
}
